package demo04;

public class Test02 {
    public static void main(String[] args) {
        //实例化一个电脑对象
        Computer computer = new Computer();
        //打开电脑
        computer.powerOn();

        //具体操作
        computer.useDevice(new Mouse());
        computer.useDevice(new keyBoard());

        //关闭电脑
        computer.powerOff();
    }
}
